<div class="col-sm-12">
  <!-- BOX -->
  <div class="box">
    <div class="box-body">
      <div id="datatable1_wrapper" class="dataTables_wrapper form-inline" role="grid">
      	<div class="row">
          <div class="col-sm-9">
        	  <!--搜索-->
            <div class="col-sm-5 nopadding-left">
        	    <div class="input-group">
            		{{input class="form-control" type="text" placeholder="老人姓名" value=queryCondition enter="search"}}
      	        <span class="input-group-btn">
        		      <button class="btn btn-primary btn-reduce" type="button" style="touch-action: manipulation; -ms-touch-action: manipulation;" {{action "search" on="click"}}>
                    <i class="fa fa-search"></i>
                  </button>
      	        </span>
        	    </div>
        	  </div>
            <div class="col-sm-3 nopadding-left">
              {{#power-select class="input-group-content" placeholder='账单状态' options=statusList  selected=status
              noMatchesMessage="没有相关内容"	allowClear=true	onchange=(action "selectStatus" ) as |status|}}
                {{status.name}}
              {{/power-select}}
            </div>
        	  <!--搜索-->
          </div>
      	  <div class="user-add-btn col-sm-3 nopadding-right">
            {{#ui/mix-button class="user-btn pull-right" iconClass="fa-plus"  text='新增账单' clickAction="toAdd" toAdd="toAdd" }}
            {{/ui/mix-button}}
      	  </div>
      	</div>
        <table id="datatable1" cellpadding="0" cellspacing="0" border="0" class="datatable table table-bordered table-hover dataTable" aria-describillby="datatable1_info">
          <thead>
            <tr role="row">
              <th rowspan="1" colspan="1" width="">老人姓名</th>
              <th rowspan="1" colspan="1" width="">结算类别</th>
              <th rowspan="1" colspan="1" width="">对应服务</th>
              <th rowspan="1" colspan="1" width="">账单时间</th>
              <th rowspan="1" colspan="1" width="">账单金额(元/月)</th>

              <th rowspan="1" colspan="1" width="">账单状态</th>
              <th rowspan="1" colspan="1" width="">操作人</th>
              <th rowspan="1" colspan="1" width="">审核人</th>
              <th rowspan="1" colspan="1" width="">操作</th>
            </tr>
          </thead>
          {{#if billList}}
          <tbody role="alert" aria-live="polite" aria-relevant="all" class="">
            {{#each billList as |bill|}}
            <tr >
              <td class="ellipsis" {{action "toDetailPage" bill on="click"}}>{{bill.customer.name}}</td>
              <td class="ellipsis" {{action "toDetailPage" bill on="click"}}>{{bill.billType.typename}}</td>
              <td class="ellipsis" {{action "toDetailPage" bill on="click"}}>{{bill.billStatType.typename}}</td>
              <td class="ellipsis" {{action "toDetailPage" bill on="click"}}>{{bill.showTime}}</td>
              <td class="ellipsis" {{action "toDetailPage" bill on="click"}}>{{bill.total}}</td>
              <td class="ellipsis" {{action "toDetailPage" bill on="click"}}>{{bill.billStatus.typename}}</td>
              <td class="ellipsis" {{action "toDetailPage" bill on="click"}}>{{bill.lastUpdateUser.name}}</td>
              <td class="ellipsis" {{action "toDetailPage" bill on="click"}}>{{bill.operateUser.name}}</td>
              <td class="ellipsis">
                {{#if bill.submitFlag}}
                  <a {{action "commit" bill on="click" bubbles=false}}>提交</a>
                {{/if}}
              </td>
            </tr>
            {{/each}}
          </tbody>
          {{else}}
          {{/if}}
        </table>
        {{#if billList }}
            {{page-numbers content=billList showFL=true numPagesToShow=5 exportAllExcel="exportToAllExcel" exportAll=exportAll}}
        {{else}}
                <h1 class="col-sm-12 center unTask"></h1>
        {{/if}}
        <table id="datatable1" cellpadding="0" cellspacing="0" border="0" style="visibility:collapse;position: absolute;z-index: -999;" class="datatable export-block table table-bordered table-hover dataTable" aria-describillby="datatable1_info">
          <thead>
            <tr role="row">
              <th rowspan="1" colspan="1" width="">老人姓名</th>
              <th rowspan="1" colspan="1" width="">账单类别</th>
              <th rowspan="1" colspan="1" width="">账单时间</th>
              <th rowspan="1" colspan="1" width="">账单金额(元)</th>
              <th rowspan="1" colspan="1" width="">备注</th>
              <th rowspan="1" colspan="1" width="">账单状态</th>
            </tr>
          </thead>
          <tbody role="alert" aria-live="polite" aria-relevant="all" class="">
            {{#each exportList as |bill|}}
            <tr >
              <td class="ellipsis" >{{bill.customer.name}}</td>
              <td class="ellipsis" >{{bill.billType.typename}}</td>
              <td class="ellipsis" >{{bill.showTime}}</td>
              <td class="ellipsis" >{{bill.total}}</td>
              <td class="ellipsis" >{{bill.showRemark}}</td>
              <td class="ellipsis" >{{bill.billStatus.typename}}</td>
            </tr>
            {{/each}}
          </tbody>
        </table>
      </div>
    </div>
  </div>

  <!-- /BOX -->
</div>


{{#if popSubmit}}
	{{#bs-modal body=false footer=false header=false closedAction=(action 'recall')}}
		{{#bs-modal-header}}
			<h3 class="modal-title">提示</h3>
		{{/bs-modal-header}}
		{{#bs-modal-body}}
			<h4 class="modal-title">是否提交本账单？</h4>
		{{/bs-modal-body}}

		{{#bs-modal-footer class="user-add-btn"}}
			{{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-save"  text='确定' clickAction="submit" submit="submit"}}
			{{/ui/mix-button}}
			{{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='取消'  clickAction="recall" recall="recall"}}
			{{/ui/mix-button}}
		{{/bs-modal-footer}}
	{{/bs-modal}}
{{/if}}
